<!DOCTYPE html><html><head>	<meta charset="UTF-8">	<title>购物车</title>	<meta name="apple-mobile-web-app-capable" content="yes">	<meta name="viewport"		content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">	<!-- <link rel="stylesheet" href="css/common.css">	<link rel="stylesheet" href="css/cart.css">	<script src="js/jquery1.js"></script>	<script src="js/shopping.js"></script>	<script src="js/fastclick.js"></script>	<script src="js/template-web.js"></script> --><script defer src="js/shopping.js"></script><link href="css/shopping.css" rel="stylesheet"></head><body>	<header class="header">		<span class="headerLeft"><a>返回</a></span>		<span class="headerTitle">购物车</span>		<span class="headerRight cart-operation edit">编辑</span>	</header>	<main class="main">		<!-- 商品1 -->		<!-- <div class="cart-block">				<div class="checkbox-wrap">					<img src="" class="tick">					<input type="checkbox" name="" id="" value="" class="checkbox mycheckbox">				</div>				<img src="" class="cart-goods-img">				<div class="cart-goods-info">					<p class="cart-goods-name">2018年颜文明旗舰店春季新款女头层牛皮经典复古男休闲运动网球鞋</p>					<div class="price-wrap">						<span>￥<span class="price">299.8</span></span>						<div class="num-wrap">							<img src="" class="sub">							<input type="number" name="" id="num-input" class="num-input" value="1" readonly/="">							<img src="" class="add">						</div>					</div>				</div>			</div>  -->		<!-- 商品2 -->		<!-- <div class="cart-block">				<div class="checkbox-wrap">					<img src="" class="tick">					<input type="checkbox" name="" id="" value="" class="checkbox mycheckbox">				</div>				<img src="" class="cart-goods-img">				<div class="cart-goods-info">					<p class="cart-goods-name">耐克NIKE体育用品男帽女帽 2018新款网球</p>					<div class="price-wrap">						<span>￥<span class="price">89</span></span>						<div class="num-wrap">							<img src="" class="sub">							<input type="number" name="" id="num-input" class="num-input" value="1" readonly/="">							<img src="" class="add">						</div>					</div>				</div>			</div>  -->		<!-- 商品3 -->		<!-- <div class="cart-block">				<div class="checkbox-wrap">					<img src="" class="tick">					<input type="checkbox" name="" id="" value="" class="checkbox mycheckbox">				</div>				<img src="" class="cart-goods-img">				<div class="cart-goods-info">					<p class="cart-goods-name">李宁运动套装健身服男三件套速干衣跑步训练服紧身衣健身房压缩衣 黑色三件套=短袖+短裤+健身裤 L(175)</p>					<div class="price-wrap">						<span>￥<span class="price">205</span></span>						<div class="num-wrap">							<img src="" class="sub">							<input type="number" name="" id="num-input" class="num-input" value="1" readonly/="">							<img src="" class="add">						</div>					</div>				</div>			</div>  -->	</main>	<div style="height: 150px;"></div>	<!-- 结算 -->	<div class="total-wrap">		<div class="total-left">			<div class="checkbox-wrap">				<img src="" class="tick alltick">				<input type="checkbox" name="" id="" value="" class="checkbox allselect">			</div>			<span>全选</span>		</div>		<div class="total-right settlement">			<p>合计:<span class="symbol">￥</span><span class="integer">0</span><span class="point"></span></p>			<button type="button" class="total-btn">去结算(<span class="checkedLen">0</span>)</button>		</div>		<div class="total-right delete-btn">			<a href="shopping.html"><button type="button" class="total-btn">删除(<span class="checkedLen">0</span>)</button></a>		</div>	</div>	<!-- 底部导航 -->	<div class="foot_menu">		<ul>			<li>				<a href="index.html">					<i><img src="" width="30" height="30"></i>					<span>首 页</span>				</a>			</li>			<li>				<a href="classification.html">					<i><img src="" width="30" height="30"></i>					<span>分 类</span>				</a>			</li>			<li class="gwc">				<a href="shopping.html">					<i><img src="" width="30" height="30"></i>					<span>购物车</span>				</a>			</li>			<li class="cur">				<a>					<i><img src="" width="30" height="30"></i>					<span>我 的</span>				</a>			</li>		</ul>	</div></body><!-- <script src="js/jquery1.js"></script><script src="js/cart.js" type="text/javascript"></script> --><script src="js/template-web.js"></script><!-- 模块引擎 --><script type="text/html" id="item1">	{{each list}}	<div class="cart-block">		<div class="checkbox-wrap">			<img src="{{$value.img1}}" class="tick">			<input type="checkbox" name="" id="" value="" class="checkbox mycheckbox">		</div>		<img src="{{$value.img2}}" class="cart-goods-img">		<div class="cart-goods-info">			<p class="cart-goods-name">{{$value.text}}</p>			<div class="price-wrap">				<span>{{$value.icon}}<span class="price">{{$value.price}}</span></span>				<div class="num-wrap">					<img src="{{$value.img3}}" class="sub">					<input type="number" name="" id="num-input" class="num-input" value="{{$value.number}}" readonly/="">					<img src="{{$value.img4}}" class="add">				</div>			</div>		</div>	</div> 	{{/each}}	</script>	<script type="text/javascript">	var object = localStorage.getItem("key");	var username = localStorage.getItem("username");	if (object != null) {		var newArr = JSON.parse(object);//转数组		for(var i=0;i<newArr.length;i++){			if(newArr[i].name == username){				var  index = i;				var objArr = newArr[index].array;				console.log(objArr);				var obj={                     list:objArr,                }				var html = template('item1', obj);				var main = document.querySelector(".main");				main.innerHTML = html;			}		}	}	</script>